projects
/
xen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
71952bf
)
tools: libxl: testidl: initialise the KeyedUnion keyvar before the union
author
Ian Campbell
<ian.campbell@citrix.com>
Wed, 4 Dec 2013 17:48:56 +0000
(17:48 +0000)
committer
Ian Campbell
<ian.campbell@citrix.com>
Thu, 5 Dec 2013 09:25:35 +0000
(09:25 +0000)
This is Coverity CID
1135378
and
1135379
.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
tools/libxl/gentest.py
patch
|
blob
|
history
diff --git
a/tools/libxl/gentest.py
b/tools/libxl/gentest.py
index 6fab4933d5ca7f0737f131013cf9bc7f3f1b4e5d..722b7f4bdc17cf5e6a0ce33bd86a9328f7b1031e 100644
(file)
--- a/
tools/libxl/gentest.py
+++ b/
tools/libxl/gentest.py
@@
-42,6
+42,7
@@
def gen_rand_init(ty, v, indent = " ", parent = None):
elif isinstance(ty, idl.KeyedUnion):
if parent is None:
raise Exception("KeyedUnion type must have a parent")
+ s += gen_rand_init(ty.keyvar.type, parent + ty.keyvar.name, indent, parent)
s += "switch (%s) {\n" % (parent + ty.keyvar.name)
for f in ty.fields:
(nparent,fexpr) = ty.member(v, f, parent is None)